<?

class graphPingTimes extends graphBase {
	protected $rrdFile = 'ping.rrd';
	protected function getOptions() {
		$opts = array(
			'DEF:pingtime_max='.$this->rrdPath.':PINGTIME:MAX',
			'DEF:pingtime='.$this->rrdPath.':PINGTIME:AVERAGE',
			'CDEF:wpingtime=pingtime,6,GE,pingtime,UNKN,IF',
			'CDEF:apingtime=pingtime,10,GE,pingtime,UNKN,IF',
			'CDEF:dpingtime=pingtime,0,LE,-1,UNKN,IF',
			'AREA:pingtime#CDEB8B:',
			'LINE1.25:pingtime#006600:Ping Response Times',
			'AREA:dpingtime#FF0000:',
			'LINE1.25:dpingtime#FF0000:Offline'
		);
		if ($this->legend) {
			$opts[] = '-v';
			$opts[] = 'Time (s)';
		}
		return $opts;
	}
}